const koa2Req = require('koa2-request');

function post(url, params) {

  return koa2Req(url, {
    method: "POST",
    encoding: null,
    headers: {
      "content-type": "application/json",
    },
    body: JSON.stringify(params)
  })
}

function get(url) {
  return koa2Req(url)
}

module.exports = {
  post,
  get
}